
/*    添加、修改年薪    */

$(".year-income-title img").click(function () {
    $(".show-income").hide();
    $(".year-income").show();

})


/*   保存年薪   */
$(".income-save-btn").click(function () {
    $(".year-income").hide();
    $(".show-income").show();

        updateYearSalary();
})

/****************************ajax 修改年薪************************************/
function updateYearSalary(){
    var resumeId = $(".resumeId").val();
       var salary =  $(".income-money").val();
         $.ajax({
               type: "POST",
               url: "/resume",
               datatype: "json",
               data:{
                   "op":"updateYearSalary",
                   "resumeId":resumeId,
                   "salary":salary
                   },
               success:function(jsonResult){
                    var result = JSON.parse(jsonResult);
                    $(".income-value").text(result.data.resumeIncome);
               }
          });
}


/*    取消    */
$(".income-undo-btn").click(function () {
    $(".year-income").hide();
    $(".show-income").show();
    if (person.personIncome == "" || person.personIncome == null || person.personIncome == "0") {
        $(".year-income-title i").remove();
    } else {
        $(".income-value").text(person.personIncome);
    }
});
